
import { Injectable } from '@angular/core';
import { ViewModel, NgCommand } from '@farris/devkit';
import { Observable } from 'rxjs';

@Injectable()
export class RightDataGridComponentViewmodel extends ViewModel {
    public bindingPath = '/zzrys';
    // farrisDataGrid列集合定义 在对应component中赋值
    public right_data_gridColumns:any;
    // datGrid 列集合名称 用以bindData使用
    public dataGridColumnsName:string;

    public dom = {
  "right-data-grid": {
    "type": "DataGrid",
    "resourceId": "right-data-grid",
    "visible": {
      "useQuote": false,
      "isExpression": false,
      "value": true
    },
    "id": "right-data-grid",
    "size": {},
    "readonly": {
      "useQuote": false,
      "isExpression": false,
      "value": false
    },
    "fields": [
      {
        "type": "GridField",
        "resourceId": "code_d1aad922_60n6",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "code_d1aad922_60n6",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "code",
          "fullPath": "Code",
          "isExpression": false,
          "value": "code"
        },
        "dataField": "code",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "编号",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "name_3bf04626_yolj",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "name_3bf04626_yolj",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "name",
          "fullPath": "Name",
          "isExpression": false,
          "value": "name"
        },
        "dataField": "name",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "名称",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "state_8f93dc0a_t07q",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "state_8f93dc0a_t07q",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "state",
          "fullPath": "State",
          "isExpression": false,
          "value": "state"
        },
        "dataField": "state",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "状态",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "organization_63ca5a4d_lw0x",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "organization_63ca5a4d_lw0x",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "organization",
          "fullPath": "Organization",
          "isExpression": false,
          "value": "organization"
        },
        "dataField": "organization",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "组织",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "gender_7e51ce58_lxqc",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "gender_7e51ce58_lxqc",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "gender",
          "fullPath": "Gender",
          "isExpression": false,
          "value": "gender"
        },
        "dataField": "gender",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "性别",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "countryOrArea_46c53cef_55t3",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "countryOrArea_46c53cef_55t3",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "countryOrArea",
          "fullPath": "CountryOrArea",
          "isExpression": false,
          "value": "countryOrArea"
        },
        "dataField": "countryOrArea",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "所属国家或地区",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      }
    ],
    "multiSelect": false,
    "showLineNumber": false,
    "lineNumberTitle": "#",
    "groupTotalText": "Total",
    "filterable": false,
    "groupable": false,
    "rowClass": ""
  }
};
    @NgCommand({
        name: 'RouteToAdd1',
        params: {
            url: '5eeb2c52-b53b-4373-b417-c4fd0342cd32',
            params: '{"action":"LoadAndAdd1"}'
        },
        paramDescriptions: {
            url: { type: 'string' },
            params: { type: 'string' }
        }
    })
    public RouteToAdd1(commandParam?: any): Observable<any> { return; }

    @NgCommand({
        name: 'RouteToEdit1',
        params: {
            url: '5eeb2c52-b53b-4373-b417-c4fd0342cd32',
            params: '{"action":"LoadAndEdit1", "id":"{DATA~/#{left-tree-grid-component}/id}"}',
            idToEdit: ''
        },
        paramDescriptions: {
            url: { type: 'string' },
            params: { type: 'string' },
            idToEdit: { type: 'string' }
        }
    })
    public RouteToEdit1(commandParam?: any): Observable<any> { return; }

    @NgCommand({
        name: 'RouteToView1',
        params: {
            url: '5eeb2c52-b53b-4373-b417-c4fd0342cd32',
            params: '{"action":"LoadAndView1", "id":"{DATA~/#{left-tree-grid-component}/id}"}',
            idToView: ''
        },
        paramDescriptions: {
            url: { type: 'string' },
            params: { type: 'string' },
            idToView: { type: 'string' }
        }
    })
    public RouteToView1(commandParam?: any): Observable<any> { return; }

    @NgCommand({
        name: 'Remove1',
        params: {
            id: '{DATA~/#{right-data-grid-component}/zzrys/id}'
        },
        paramDescriptions: {
            id: { type: 'string' }
        }
    })
    public Remove1(commandParam?: any): Observable<any> { return; }

}